import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"
import { fas } from '@fortawesome/free-solid-svg-icons'
import "@/util/permission.js"
import "@/util/http.js"
import "@/mockJs/index.js"

import App from './App.vue'
import router from './router'
import piniaPersist from 'pinia-plugin-persist'

const pinia = createPinia()
const app = createApp(App)
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
library.add(fas)

pinia.use(piniaPersist)
app.use(pinia)
app.use(router)
app.use(ElementPlus)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	app.component(key, component)
}
app.mount('#app')
app.component("font-awesome-icon", FontAwesomeIcon)


